package com.kun.springbootorder.service.impl;

import com.kun.springbootorder.entity.Order;
import com.kun.springbootorder.mapper.OrderMapper;
import com.kun.springbootorder.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author kunkun
 * @since 2025-02-25
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
    @Autowired
    public OrderMapper orderMapper;

    @Override
    public Integer insertOrder(Order order) {
        int num = orderMapper.insert(order);
        return num;
    }

    @Override
    public Order queryOrderById(Integer id) {
        return orderMapper.selectById(id);
    }

}
